home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / cc / sprite / RCS / config.gcc,v < prev    next >
Encoding:
Text File  |  1989-09-26  |  6.0 KB  |  307 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.2
  10. date     89.03.12.21.02.45;  author rab;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     89.02.27.23.44.35;  author rab;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @@
  22.  
  23.  
  24. 1.2
  25. log
  26. @*** empty log message ***
  27. @
  28. text
  29. @#!/bin/sh
  30. # Configuration script for GNU CC
  31. #   Copyright (C) 1988 Free Software Foundation, Inc.
  32.  
  33. #This file is part of GNU CC.
  34.  
  35. #GNU CC is free software; you can redistribute it and/or modify
  36. #it under the terms of the GNU General Public License as published by
  37. #the Free Software Foundation; either version 1, or (at your option)
  38. #any later version.
  39.  
  40. #GNU CC is distributed in the hope that it will be useful,
  41. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  42. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  43. #GNU General Public License for more details.
  44.  
  45. #You should have received a copy of the GNU General Public License
  46. #along with GNU CC; see the file COPYING.  If not, write to
  47. #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  48.  
  49. #
  50. # Shell script to create proper links to machine-dependent files in
  51. # preparation for compiling gcc.
  52. #
  53. # Usage: config.gcc [vint] machine
  54. #
  55. # If config.gcc succeeds, it leaves its status in config.status.
  56. # If config.gcc fails after disturbing the status quo, 
  57. #     config.status is removed.
  58. #
  59.  
  60. progname=$0
  61.  
  62. remove=rm
  63. hard_link=ln
  64. symbolic_link='ln -s'
  65.  
  66. #for Test
  67. #remove="echo rm"
  68. #hard_link="echo ln"
  69. #symbolic_link="echo ln -s"
  70.  
  71. case $# in
  72. 2)
  73.     vint=on
  74.     shift
  75.     ;;
  76. *)
  77.     ;;
  78. esac
  79.  
  80. case $# in
  81. 1)
  82.     machine=$1
  83.  
  84.     case $machine in
  85.     vax)                    # for vaxen running bsd
  86.         ;;
  87.     vms)                    # for vaxen running VMS
  88.         cpu_type=vax
  89.         configuration_file=xm-${machine}.h
  90.         target_machine=tm-${machine}.h
  91.         ;;
  92.     vax-sysv | vaxv)            # for vaxen running system V
  93.         cpu_type=vax
  94.         configuration_file=xm-vaxv.h
  95.         target_machine=tm-vaxv.h
  96.         ;;
  97.     sequent-i386)            # for Intel 80386's on Sequent Symmetry
  98.         cpu_type=i386
  99.         configuration_file=xm-i386.h
  100.         target_machine=tm-seq386.h
  101.         ;;
  102.     i386-sysv | i386v)        # for Intel 80386's running system V
  103.         machine=i386v
  104.         cpu_type=i386
  105.         configuration_file=xm-${machine}.h
  106.         target_machine=tm-${machine}.h
  107.         ;;
  108.     i386-sysv-gas | i386g)
  109.         cpu_type=i386
  110.         configuration_file=xm-i386v.h
  111.         target_machine=tm-i386gas.h
  112.         ;;        
  113.     next )
  114.         cpu_type=m68k
  115.         configuration_file=xm-m68k.h      
  116.         target_machine=tm-next.h
  117.         ;;
  118.     spur)
  119.             cpu_type=spur
  120.         configuration_file=xm-spur.h
  121.         target_machine=tm-spur.h
  122.         ;;
  123.     sun4 | sun-4)
  124.         cpu_type=sparc
  125.         configuration_file=xm-sparc.h
  126.         target_machine=tm-sun4os3.h
  127.         ;;
  128.     sun3 | sun-3)
  129.         cpu_type=m68k
  130.         configuration_file=xm-m68k.h
  131.         target_machine=tm-sun3.h
  132.         ;;
  133.     sun3-nfp | sun-3-nfp)
  134.         cpu_type=m68k
  135.         configuration_file=xm-m68k.h
  136.         target_machine=tm-sun3-nfp.h
  137.         ;;
  138.     sun3-fpa | sun-3-fpa)
  139.         cpu_type=m68k
  140.         configuration_file=xm-m68k.h
  141.         target_machine=tm-sun3-fpa.h
  142.         ;;
  143.     sun2 | sun-2)
  144.         cpu_type=m68k
  145.         configuration_file=xm-m68k.h
  146.         target_machine=tm-sun2.h
  147.         ;;
  148.     sun386 | sun386i | roadrunner)
  149.         cpu_type=i386
  150.         configuration_file=xm-sun386i.h
  151.         target_machine=tm-sun386i.h
  152.         ;;
  153.     sun4-os4 | sun-4-os4)
  154.         cpu_type=sparc
  155.         configuration_file=xm-sunos4.h
  156.         target_machine=tm-sparc.h
  157.         ;;
  158.     sun3-os4 | sun-3-os4)
  159.         cpu_type=m68k
  160.         configuration_file=xm-sunos4.h
  161.         target_machine=tm-sun3.h
  162.         ;;
  163.     sun3-nfp-os4 | sun-3-nfp-os4)
  164.         cpu_type=m68k
  165.         configuration_file=xm-sunos4.h
  166.         target_machine=tm-sun3-nfp.h
  167.         ;;
  168.     sun3-fpa-os4 | sun-3-fpa-os4)
  169.         cpu_type=m68k
  170.         configuration_file=xm-sunos4.h
  171.         target_machine=tm-sun3-fpa.h
  172.         ;;
  173.     sun2-os4 |sun-2-os4)
  174.         cpu_type=m68k
  175.         configuration_file=xm-sunos4.h
  176.         target_machine=tm-sun2.h
  177.         ;;
  178.     hp9k320)            # HP 9000 series 300 with gcc alone
  179.         cpu_type=m68k
  180.         configuration_file=xm-hp9k320.h
  181.         ;;
  182.     hp9k320g)            #    with gnu as, ld and gdb
  183.         cpu_type=m68k
  184.         configuration_file=xm-hp9k320.h
  185.         ;;
  186.     isi68)
  187.         cpu_type=m68k
  188.         ;;
  189.     news800)
  190.         cpu_type=m68k
  191.         ;;
  192.     3b1)
  193.         cpu_type=m68k
  194.         configuration_file=xm-${machine}.h
  195.         ;;
  196.     sequent-ns32k | sequent)
  197.         cpu_type=ns32k
  198.         aux_output=output-ns32k.c
  199.         ;;
  200.     encore)
  201.         cpu_type=ns32k
  202.         aux_output=output-ns32k.c
  203.         ;;
  204.     genix)
  205.         machine=ns32k
  206.         cpu_type=ns32k
  207.         configuration_file=xm-gnx.h
  208.         ;;
  209.     88000)
  210.         cpu_type=m88k
  211.         target_machine=tm-${cpu_type}.h
  212.         ;;
  213.     alliant)                # Alliant FX/8
  214.         ;;
  215.     convex-c1)                # Convex C1
  216.         target_machine=tm-convex1.h
  217.         cpu_type=convex
  218.         ;;
  219.     convex-c2)                # Convex C2
  220.         target_machine=tm-convex2.h
  221.         cpu_type=convex
  222.         ;;
  223. #    370)
  224. #        machine=370
  225. #        ;;
  226.     esac
  227.  
  228.         # if cpu_type is not set, define cpu_type to machine.
  229.         #
  230.     cpu_type=${cpu_type=$machine}
  231.     configuration_file=${configuration_file=xm-$cpu_type.h}
  232.     target_machine=${target_machine=tm-$machine.h}
  233.     machine_description=${cpu_type}.md
  234.     aux_output=${aux_output=output-$cpu_type.c}
  235.  
  236.     if [ xx${vint} = xx ]
  237.     then
  238.         files="$configuration_file $target_machine
  239.             $machine_description $aux_output"
  240.         links="config.h tm.h md aux-output.c"
  241.     else
  242.         files="$configuration_file tm-vmc.h $target_machine
  243.             $machine_description $aux_output"
  244.         links="config.h tm.h tm-pre.h md aux-output.c"
  245.     fi
  246.  
  247.     while [ -n "$files" ]
  248.     do
  249.         # set file to car of files, files to cdr of files
  250.         set $files; file=$1; shift; files=$*
  251.         set $links; link=$1; shift; links=$*
  252.  
  253.         if [ ! -r $file ]
  254.         then
  255.             echo "$progname: cannot create a link \`$link',"
  256.             echo "since the file \`$file' does not exist."
  257.             exit 1
  258.         fi
  259.  
  260.         $remove -f $link
  261.         rm -f config.status
  262.         # Make a symlink if possible, otherwise try a hard link
  263.         $symbolic_link $file $link 2>/dev/null || $hard_link $file $link
  264.  
  265.         if [ ! -r $link ]
  266.         then
  267.             echo "$progname: unable to link \`$link' to \`$file'."
  268.             exit 1
  269.         fi
  270.         echo "Linked \`$link' to \`$file'."
  271.     done
  272.  
  273.     if [ xx${vint} = xx ]
  274.     then
  275.         echo "Links are now set up for use with a $machine." \
  276.             | tee config.status
  277.     else
  278.         echo "Links are now set up for use with a $machine (vint)." \
  279.             | tee config.status
  280.     fi
  281.     exit 0
  282.  
  283.     ;;
  284. *)
  285.     echo "Usage: $progname machine"
  286.     echo -n "Where \`machine' is something like "
  287.     echo "\`vax', \`sun3', \`umax', etc."
  288.     if [ -r config.status ]
  289.     then
  290.         cat config.status
  291.     fi
  292.     exit 1
  293.     ;;
  294. esac
  295. @
  296.  
  297.  
  298. 1.1
  299. log
  300. @Initial revision
  301. @
  302. text
  303. @d89 6
  304. a94 1
  305.     ;;
  306. @
  307.